package fr.generali.accueilclient.gwt.client.dispatch.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

import fr.generali.accueilclient.gwt.client.dispatch.event.ActionDispatchedEvent.ActionDispatchedHandler;

public class ActionDispatchedEvent extends GwtEvent<ActionDispatchedHandler> {

    public static final Type<ActionDispatchedHandler> TYPE = new Type<ActionDispatchedHandler>();

    public ActionDispatchedEvent() {
    }

    @Override
    protected void dispatch(ActionDispatchedHandler handler) {
        handler.onActionDispatched(this);
    }

    @Override
    public Type<ActionDispatchedHandler> getAssociatedType() {
        return TYPE;
    }

    public interface ActionDispatchedHandler extends EventHandler {

        void onActionDispatched(ActionDispatchedEvent event);
    }

}
